var app = getApp()
//引入请求封装
import {
  request
} from "../../request/request.js"; //ES6 promise
Page({
  data: {
    longitude: "109.18632196329877",
    latitude: "34.366323734973534",
    marker: [{
      id: 1,
      latitude: '34.366323734973534',
      longitude: '109.18632196329877',
      iconPath: '/image/location.png',
      width: '50px',
      height: '50px'
    }]
  },
  Data: {
    code: "031LtRkl2Aevp84tAIkl2JAX4I2LtRkq"
  },
  async sayHello() {
    let that = this
    const res = await request({
      url: "/t1",
      method: "GET"
    })
    if (res.status == 200) {
      console.log(res)
    }
  },
  
  async but() {
    let that = this
    const res = await request({
      url: "/t2",
      method: "GET"
    })
    if (res.status == 200) {
      console.log(res)
    }
  },
  onLoad() {
    this.sayHello()
  }
})